package com.v5ba.annotation.web;

import com.v5ba.sms.handler.RedisHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    //@Autowired
    private RedisHandler redisHandler;

    @GetMapping("get")
    public String get(String key){
        String name = redisHandler.get(key);
        System.out.println(key+":"+name);
        return "ok";
    }

    @GetMapping("set")
    public String set(String key, String val){
        redisHandler.set(key, val);
        return "ok";
    }
}
